<!DOCTYPE html>
<!-- saved from url=(0038)http://vision.stanford.edu/people.html -->
<head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <title>个人信息</title>
   <script type="text/javascript" src="js/header.js"></script>
  <link href="css/bootstrapmin.css" rel="stylesheet" media="screen">
  <link href="css/style.css" rel="stylesheet">

</head>

<body>


<?php
	require("header.php");
	echo"<div id= 'achievement' >";
	require("DBops.php");
	require_once("editPublishedPaper.php");
	//session_start();
	$con = connect("localhost", "root", "", "lab");
		if(isset($_SESSION['user'])){
			$result = query($con, "*", "personalinfo", "ID", $_SESSION['user']);
			$row = mysql_fetch_array($result);
			$loginID=$row['role'];
			echo "<div style='height:30px;background:#A4D3EE;margin-top:-20px;'>
              <p  style='margin-right:10px;float:right;'>登录为: <a href = \"infor.php?id=".$_SESSION['user']."\">".$_SESSION['user']."</a></font>&nbsp&nbsp<a  onclick=\"if(confirm('确定要退出系统吗?')){parent.location.href ='logout.php'}\" href=\"javascript:void(0)\">退出</a></font></p></div>";
		}
		else {
			$_SESSION['userurl'] = $_SERVER['REQUEST_URI']; 
			echo "<div style='height:30px;background:#A4D3EE;margin-top:-30px;'>
				<ul>
					 <li  style='margin-right:10px;float:right;'><a href ='login.php'>登录</a></div>";

		}
		
		$ID=  $_GET["id"];
		$result = query($con, "*", "personalinfo", "ID", $ID);
		$row = mysql_fetch_array($result);
		$name=$row['name'];
		$email=$row['email'];
		
		 $email1= str_replace("@", " At ", $email);
		// echo $email1;
		if(isset($_SESSION['user'])){
			if(($ID==$_SESSION['user'])||($loginID=='administrator')){
				echo"
				
				<div style='float:right;margin-right:10px;'><font style=\"size:28px;color:#0000FF;\"><a href=\"Makeup.php?id=$ID\" style=\"size:28px;color:#0000FF;\">完善资料</a></font></div>
				<table  width=\"650px\"   align=\"center\" >
				<tr >
				<td style='width:300px;height:230px;'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href = \"Photo.php?id=$ID\">";
			}
			else{
				echo" <table  width=\"650px\" border='0'  align=\"center\">
				<tr >
				<td style='width:300px;height:230px;margin-right:20px;'>";}
			if($row['image']){
				echo"&nbsp;&nbsp;&nbsp;&nbsp;<img src=\"".$row['image']."\" style=\"height:230px;width:180px;\" alt = \"头像\">";
			}
			else{
				echo"&nbsp;&nbsp;&nbsp;&nbsp;<img src='img/noavatar_big.gif' style=\"height:230px;width:180px;\" alt = \"头像\">";
			}
			echo"</a></td>
				<td width=\"300\" height=\"230px\">
				<font style='size=11px;'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>个人信息</b></font><br/><br/>
				<font style='size=11px;'>&nbsp;&nbsp;&nbsp;<b>姓名：".$row['name']."</b></font><br/><br/>
				<font style='size=11px;'>&nbsp;&nbsp;&nbsp;<b>手机：".$row['phone']."</b></font><br/><br/>
				<font style='size=11px;'>&nbsp;&nbsp;&nbsp;<b>邮箱：".$email1."</b></font><br/><br/>
				<font style='size=11px;'>&nbsp;&nbsp;&nbsp;<b>地址：".$row['office']."</b></font><br/></td>
			 </tr>
			</table><br/>";
			
		}
		else{
			echo"
				 <table  width=\"650px\" border=\"0\" color= \"sivler\" align=\"center\" cellspacing= \"20\" cellpadding=\"20\">
				 <tr >
				 <td width=\"269\" height=\"269\" align = \"center\" >";
			if($row['image']){
				echo"<img src=\"".$row['image']."\" style=\"height:230px;width:180px;\" alt = \"头像\">";
			}
			else{
				echo"<img src='img/noavatar_big.gif' style=\"height:230px;width:180px;\" alt = \"头像\">";
			}
			echo"</a></td>
				<td width=\"300\" height=\"269\">
				<font style='size=11px;'><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;个人信息</b></font><br/><br/>
				<font style='size=11px;'><b>&nbsp;&nbsp;&nbsp;姓名：".$row['name']."</b></font><br/><br/>
				<font style='size=11px;'><b>&nbsp;&nbsp;&nbsp;邮箱：".$row['email']."</b></font><br/><br/>
				<font style='size=11px;'><b>&nbsp;&nbsp;&nbsp;地址：".$row['office']."</b></font><br/></td>
				 </tr>
				 </table><br/>";
		}
		
	echo"
		<p style=\"clear:left;\"><strong>  &nbsp;&nbsp;&nbsp;&nbsp;个人简介：</strong></p><hr >
		<ol style='height:70px;'>	".$row['selfIntro']."	</ol>
		<p style=\"clear:left;\"><strong>  &nbsp;&nbsp;&nbsp;&nbsp;研究方向：</strong></p><hr >
		<ol style='height:70px;'>		".$row['researchArea']."	</ol>";
	echo"
		<p style=\"clear:left;\"><strong>  &nbsp;&nbsp;&nbsp;&nbsp;发表文章：";
		if($browser_info->id==$_GET['id']){
		?>
		<a style="float:right;margin-right:10px;" target="_blank" href='editPublishedPaper.html'>编辑</a>
		<?php
		}
		
	echo "</strong></p><hr >
		<ol >";
		disOnWeb($row['name'],$row['publication']);
	echo "	</ol>
		<p style=\"clear:left\";></p>";
?>


</body>
</html>